package de.mhu.mandalaui.impl;

import de.mhu.mandalaui.Ui;
import de.mhu.mandalaui.UiFactory;
import de.mhu.mandalaui.Window;

public class DefaultUiFactory extends UiFactory {

	private Ui ui = new DefaultUi();
	private long nextId = 0;

	@Override
	public Window createWindow(String id) {
		if (id == null) id = "mv" + (++nextId);
		return new DefaultWindow(ui, id);
	}

	@Override
	public Ui getUi() {
		return ui;
	}

}
